<template>
  <div>
    <h1>Parent</h1>
    <Child
      class="content"
      :style="{ fontStyle: 'italic' }"
      :name="name"
      :age="age"
      :sex="sex"
      :count="count"
      :getData1="getData1"
      :getData2="getData2"
      :getData3="getData3"
      @abc="abc"
    />
  </div>
</template>

<script>
import Child from "./Child";
export default {
  name: "Parent",
  components: {
    Child,
  },
  data() {
    return {
      name: "老王",
      age: 18,
      sex: "男",
      count: 0,
    };
  },
  methods: {
    getData1() {
      console.log("getData1");
    },
    getData2() {
      console.log("getData2");
    },
    getData3() {
      console.log("getData3");
    },
    abc() {
      console.log("abc");
    },
  },
};
</script>

<style>
</style>